{extend name="public/base"}
{block name="title"}{$site_title}{/block}
{block name="body"}
<style>
    .recommendList{margin-top: 0 !important;}
    .recommendList ul li{padding: 10px 0;margin: 0 !important;border-bottom: 1px solid #dbdbdb}
    .recommendList ul li label{font-size: 1.6rem;line-height: 1.6}
    .recommendList ul li input{float: right;font-size: 1.6rem;text-align: right;border: none}
    .recommendList ul li select{float: right;font-size: 1.6rem;text-align: right;border: none}
    .recommendList ul li img{width:8rem;float: right;border-radius: 8px;display: block}
    input:disabled {background-color:#fff}
    .dopost{width: 100%;display: block;font-size: 1.4rem;color: #fff;background-color: #ff6000;text-align: center;line-height: 2.6;border-radius: 8px;font-weight: bold}
</style>
<div class="cartoonWapper cartoonflex">
    <a href="javascript:;" class="active">个人信息</a>
    <div class="historyLine"></div>
</div>
<div class="height_45"></div>
<div class="swiper-container swiper-history">
     <div class="swiper-wrapper">
          <div class="swiper-slide">
              <div class="cartoonRecommend">
                  <div class="recommendList">
                      <ul id="listBox">
                          <li style="height: 8rem;padding: 1rem 0">
                              <label style="line-height: 8rem">头像</label>
                              <img src="{$userinfo.headimgurl}" id="imgupload">
                              <input type="hidden" class="hideval" name="cover" value="{$userinfo.headimgurl}">
                          </li>
                          <div class="wx_clear"></div>
                          <li><label>昵称</label><input value="{$userinfo.nickname}" id="nickname"></li>
                          <li>
                              <label>性别</label>
                              <select value="wuxiong">
                                  <option value="{$userinfo.sex}">
                                      {switch name="userinfo.sex"}
                                      {case value="1"}男{/case}
                                      {case value="2"}女{/case}
                                      {default /}未知
                                      {/switch}
                                  </option>
                                  <option value="1">男</option>
                                  <option value="2">女</option>
                              </select>
                          </li>
                          <li><label>手机号</label><input value="{$userinfo.phone}" disabled></li>
                          <li><a href="javascript:void(0);" class="dopost" onclick="dopost()">确认修改</a></li>
                      </ul>
                  </div>
              </div>
          </div>
     </div>
</div>
{:getBlock('common_footer','other')}
{/block}
{block name="footJs"}
<script type="text/javascript" src="__IJS__/user_info.min.js?wxww"></script>
<link rel="stylesheet" href="/static/layadmin/layui/css/layui.css" media="all">
<script src="/static/layadmin/layui/layui.js"></script>
<script>
    layui.use('upload', function(){
        var $ = layui.jquery,upload = layui.upload;
        //普通图片上传
        var uploadInst = upload.render({
            elem: '#imgupload',
            url: U("imgupload"),
            before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#imgupload').attr('src', result); //图片链接（base64）
                });
            },
            done: function(res){
                $('.hideval').val(res.data.url);
                return layer.msg('头像上传成功');
            },
            error: function(){
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function(){
                    uploadInst.upload();
                });
            }
        });
    });
</script>
{/block}